#include <bits/stdc++.h>

#define int long long

using namespace std;

void solve()
{
    int n;
    cin >> n;
    vector<int> ji,ou;
    int ans = 0;
    for(int i = 1; i <= n; i ++)
    {
        int x;
        cin >> x;
        if(x % 2 == 0) ou.push_back(x),ans += x;
        else ji.push_back(x);
    }
    if(ji.size() == 0)
    {
        cout << 0 << endl;
        return;
    }
    for(int i = 0; i <= ou.size() - 1; i ++)
    {
        ans += ou[i];
    }
    sort(ji.begin(),ji.end());
    int left = 0;
    int right = ji.size() - 1;
    while(left <= right)
    {
        ans += ji[right];
        right --;
        left ++;
    }
    cout << ans << endl;
}

signed main()
{
    int t;
    cin >> t;
    while(t --)
    {
        solve();
    }
}